package com.nf.teamwork.mall.service.impl;

import com.nf.teamwork.mall.dao.CartInfDao;
import com.nf.teamwork.mall.entity.CartInf;
import com.nf.teamwork.mall.service.CartInfService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: LJP
 * @Classname CartInfServiceImpl
 * @Date: 2020-02-27 13:40
 * @Description: 购物车表service层
 */
@Service
public class CartInfServiceImpl implements CartInfService {
    @Autowired
    private CartInfDao cartInfDao;
    @Override
    public List<CartInf> findAll() {
        return cartInfDao.findAll();
    }

    @Override
    public Integer getCartProductCountByUserInfId(int userInfId) {
        return cartInfDao.getCartProductCountByUserInfId(userInfId);
    }
}
